Socket
Book a DemoInstallSign in
Socket

open

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open

open a file or url in the user's preferred application

Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
56M
-4.95%
Maintainers
2
Weekly downloads
 
Created
Source

open

Open a file or url in the user's preferred application.

Usage

var open = require("open");
open("http://www.google.com");

open taks an optional argument specifying the program to be used to open the file or URL.

open("http://www.google.com", "firefox");

Installation

npm install open

How it works

  • on win32 uses start
  • on darwin uses open
  • otherwise uses the xdg-open script from freedesktop.org

Warning

The same care should be taken when calling open as if you were calling child_process.exec directly. If it is an executable it will run in a new shell.

Keywords

start

FAQs

Package last updated on 10 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts